  <?php 
  $arrAdv =$this->list_advertisement(4);
  if(!empty($arrAdv)){?>
  <tr>
    <td valign="top">
 <table align="center" cellspacing="0" cellpadding="0" border="0">
    <?php foreach($arrAdv as $advList){
		if(!empty($advList['adv_image'])){
		$ext = explode('.',$advList['adv_image']);
		$ext = $ext[1];
	?>
    <tr>
      <td>
     <?php if($ext== 'swf'){?>
      <div style="z-index:0; position:relative;">
      <a href="<?php echo $advList['adv_url']?>" <?php if($advList['adv_open']==1){?> target="_blank" <?php }?>>
      <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="680" height="140" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="MOVIE" VALUE="<?php echo $this->site['base_url']?>uploads/adv/<?php echo $advList['adv_image']?>">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="WMODE" VALUE="transparent">
<PARAM NAME="QUALITY" VALUE="high"> 
      <embed class="adv_embed_left_right" src="<?php echo $this->site['base_url']?>uploads/adv/<?php echo $advList['adv_image']?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="680"  height="140"></embed>
      </OBJECT>
      </a>
      </div>
      <?php }elseif($ext== 'flv'){?>
       <div id="video">
        	You need to upgrade your Flash Player or to allow javascript to enable Website menu.</br>
        	<a href="http://www.adobe.com/go/getflashplayer">Get Flash Player</a>            
        </div>
        <script type='text/javascript' src='<?php echo $this->site['base_url']?>themes/plugins/mediaplayer/swfobject.js'></script>
        <script type='text/javascript'> 
        	var s1 = new SWFObject('<?php echo $this->site['base_url']?>themes/plugins/mediaplayer/player.swf','video','200','200','9'); 
        	s1.addParam('allowfullscreen','true'); 
        	s1.addParam('flashvars','file=<?php echo $this->site['base_url']?>uploads/adv/<?php echo $advList['adv_image']?>')
        	s1.write('video'); 
        </script>
      <?php }else {?>
      <a href="<?php echo $advList['adv_url']?>" <?php if($advList['adv_open']==1){?> target="_blank" <?php }?>>
      <img class="adv_img_left_right" alt="<?php echo $advList['adv_name']?>" src="<?php echo $this->site['base_url']?>uploads/adv/<?php echo $advList['adv_image']?>"></a>
      <?php } ?>
      </td>
    </tr>    
    <?php } }?>
</table>
</td>
  </tr>
  <?php }?>